<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>NATS C Client with JetStream and Streaming support: Callbacks</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;" >
   <div id="projectname">NATS C Client with JetStream and Streaming support
   &#160;<span id="projectnumber">3.10.0-beta</span>
   </div>
   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__micro_callbacks.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a>  </div>
  <div class="headertitle"><div class="title">Callbacks<div class="ingroups"><a class="el" href="group__micro_group.html">- Microservices</a></div></div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gab465a9b31672c63738e8f6b0a61c2e90" id="r_gab465a9b31672c63738e8f6b0a61c2e90"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group__micro_types.html#ga41ae4121cf2f8e326369bbc2e44e20d7">microError</a> *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__micro_callbacks.html#gab465a9b31672c63738e8f6b0a61c2e90">microRequestHandler</a>) (<a class="el" href="group__micro_types.html#ga417ace5dc09fe8a2f6fd3882302a37c4">microRequest</a> *req)</td></tr>
<tr class="memdesc:gab465a9b31672c63738e8f6b0a61c2e90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback type for request processing.  <br /></td></tr>
<tr class="separator:gab465a9b31672c63738e8f6b0a61c2e90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7a40fbbb9b1102f0a7679f9dfcf6c0d6" id="r_ga7a40fbbb9b1102f0a7679f9dfcf6c0d6"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__micro_callbacks.html#ga7a40fbbb9b1102f0a7679f9dfcf6c0d6">microErrorHandler</a>) (<a class="el" href="group__micro_types.html#gaf6f5aef8773b70746e84c100c2b19b28">microService</a> *m, <a class="el" href="group__micro_types.html#gaea03a1fb23faec1d7919054b27acfbc3">microEndpoint</a> *ep, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> s)</td></tr>
<tr class="memdesc:ga7a40fbbb9b1102f0a7679f9dfcf6c0d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback type for async error notifications.  <br /></td></tr>
<tr class="separator:ga7a40fbbb9b1102f0a7679f9dfcf6c0d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae0341a98388ffd1094472d2ced36d840" id="r_gae0341a98388ffd1094472d2ced36d840"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__micro_callbacks.html#gae0341a98388ffd1094472d2ced36d840">microDoneHandler</a>) (<a class="el" href="group__micro_types.html#gaf6f5aef8773b70746e84c100c2b19b28">microService</a> *m)</td></tr>
<tr class="memdesc:gae0341a98388ffd1094472d2ced36d840"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback type for <code>Done</code> (service stopped) notifications.  <br /></td></tr>
<tr class="separator:gae0341a98388ffd1094472d2ced36d840"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Microservice callbacks. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="gab465a9b31672c63738e8f6b0a61c2e90" name="gab465a9b31672c63738e8f6b0a61c2e90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab465a9b31672c63738e8f6b0a61c2e90">&#9670;&#160;</a></span>microRequestHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="group__micro_types.html#ga41ae4121cf2f8e326369bbc2e44e20d7">microError</a> *(* microRequestHandler) (<a class="el" href="group__micro_types.html#ga417ace5dc09fe8a2f6fd3882302a37c4">microRequest</a> *req)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is the callback that one provides when creating a microservice endpoint. The library will invoke this callback for each message arriving to the specified subject.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>The request object, containing the message and other relevant references.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__micro_types.html#ga7718d2f2c911e4cf677788f4ffe048cd" title="The Microservice endpoint configuration object.">microEndpointConfig</a>, <a class="el" href="structmicro__endpoint__config__s.html">micro_endpoint_config_s</a>. </dd></dl>

</div>
</div>
<a id="ga7a40fbbb9b1102f0a7679f9dfcf6c0d6" name="ga7a40fbbb9b1102f0a7679f9dfcf6c0d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7a40fbbb9b1102f0a7679f9dfcf6c0d6">&#9670;&#160;</a></span>microErrorHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* microErrorHandler) (<a class="el" href="group__micro_types.html#gaf6f5aef8773b70746e84c100c2b19b28">microService</a> *m, <a class="el" href="group__micro_types.html#gaea03a1fb23faec1d7919054b27acfbc3">microEndpoint</a> *ep, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> s)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If specified in microServiceConfig, this callback is invoked for internal errors (e.g. message delivery failures) related to a microservice. If the error is associated with an endpoint, the ep parameter points at the endpoint. However, this handler may be invoked for errors happening in monitoring subjects, in which case ep is NULL.</p>
<p>The error handler is invoked asynchronously, in a separate theread.</p>
<p>The error handler is not invoked for microservice-level errors that are sent back to the client as responses. Note that the error counts in microEndpointStats include both internal and service-level errors.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>The microservice object. </td></tr>
    <tr><td class="paramname">ep</td><td>The endpoint object, or NULL if the error is not associated with an endpoint. </td></tr>
    <tr><td class="paramname">s</td><td>The NATS status for the error.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__micro_types.html#ga1e46c0657cf42e83b366d224f380fb55" title="The microservice configuration object.">microServiceConfig</a>, <a class="el" href="structmicro__service__config__s.html" title="The Microservice top-level configuration object.">micro_service_config_s</a>. </dd></dl>

</div>
</div>
<a id="gae0341a98388ffd1094472d2ced36d840" name="gae0341a98388ffd1094472d2ced36d840"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae0341a98388ffd1094472d2ced36d840">&#9670;&#160;</a></span>microDoneHandler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* microDoneHandler) (<a class="el" href="group__micro_types.html#gaf6f5aef8773b70746e84c100c2b19b28">microService</a> *m)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If specified in microServiceConfig, this callback is invoked right after the service stops. In the C client, this callback is invoked directly from the microService_Stop function, in whatever thread is executing it.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>The microservice object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__micro_types.html#ga1e46c0657cf42e83b366d224f380fb55" title="The microservice configuration object.">microServiceConfig</a>, <a class="el" href="structmicro__service__config__s.html" title="The Microservice top-level configuration object.">micro_service_config_s</a>. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
    <a href="http://www.nats.io">
    </a></li>
  </ul>
</div>
</body>
</html>
